Obsolete Roots, Sampling, and Logging surface area per SEP-2577#1651
Open
tarekgh wants to merge 1 commit into
Open
Obsolete Roots, Sampling, and Logging surface area per SEP-2577#1651tarekgh wants to merge 1 commit into
tarekgh wants to merge 1 commit into
Conversation
Mark all public API surface for the Roots, Sampling, and Logging features as [Obsolete] in line with SEP-2577. This covers protocol DTOs, capability properties, method-name constants, convenience methods, handlers, builders, filters, and the related sampling/roots helpers on the input request/response types. There is no functional or wire behavior change; the features continue to work exactly as before. All three features share a single diagnostic ID (MCP9005) so consumers can opt out with one suppression, while feature-specific messages keep the diagnostics distinguishable. Documents the new diagnostic in docs/list-of-diagnostics.md and suppresses MCP9005 where the SDK, tests, and samples exercise the deprecated APIs internally.
PranavSenthilnathan
approved these changes
Jun 17, 2026
Comment on lines
+5
to
+6
| <!-- Suppress the Roots, Sampling, and Logging obsoletion warning (SEP-2577) in sample projects | ||
| that demonstrate the deprecated features, which continue to work. --> |
Contributor
There was a problem hiding this comment.
Are there other projects besides the logging sample project that require this? Ideally out samples shouldn't use deprecated features unless they're specifically samples for that feature.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Marks the public API surface for the Roots, Sampling, and Logging features as
[Obsolete]in line with SEP-2577, which deprecates these three features in specification version 2026-07-28.There is no functional or wire-behavior change. The features continue to work exactly as before; consumers simply get a compile-time deprecation warning guiding them away from the deprecated surface.
What is deprecated
The deprecation covers the full surface area of all three features:
Root,ListRootsResult,CreateMessageRequestParams,CreateMessageResult,SamplingMessage,ModelPreferences,LoggingLevel,SetLevelRequestParams,LoggingMessageNotificationParams, and related types).RootsCapability,SamplingCapability,LoggingCapability, and the corresponding properties onClientCapabilities/ServerCapabilities).RequestMethodsandNotificationMethods.Diagnostic ID
All three features share a single diagnostic ID, MCP9005, so consumers can opt out with one suppression. Feature-specific messages (Roots, Sampling, Logging) keep the diagnostics distinguishable in build output.
docs/list-of-diagnostics.md.MCP9005internally where the SDK, tests, and samples still exercise the deprecated APIs.Validation
dotnet build -c Release: succeeds with 0 warnings (TreatWarningsAsErrors=true).dotnet test -c Release: all tests pass.